<template>
  <span>
    <!-- 导航菜单 -->
    <el-menu
      ref="menu"
      :default-active="this.$route.path"
      class="el-menu-demo"
      mode="horizontal"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      router
    >
      <el-menu-item :index="'/'">业务主页</el-menu-item>

      <el-menu-item
        v-if="isLoginStatus"
        :index="'/myOrder/' + getUserInfo().username"
        >我的订单</el-menu-item
      >

      <el-menu-item
        v-if="isLoginStatus"
        :index="'/myInfo/' + getUserInfo().username"
        >个人信息</el-menu-item
      >
    </el-menu>
  </span>
</template>

<script>
import baseMixin from "../mixin/baseMixin";
export default {
  mixins: [baseMixin],
  data() {
    return {
      isLoginStatus: false,
    };
  },
  methods: {
    test() {},
  },
  created() {
    this.isLoginStatus = this.checkUserLoginStatus();
  },
};
</script>

<style lang="scss">
@import "../assets/css/global.scss";
.el-menu-demo {
  margin: 5px 0px;
}
</style>